package com.torry.edss.integration.feign.eastmoney.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author torry.wang
 */
@Data
@ApiModel("股票池响应数据")
public class EMLimitDownPoolResponse {

    @JsonProperty("rc")
    @ApiModelProperty(value = "返回码", example = "0")
    private Integer rc;

    @JsonProperty("rt")
    @ApiModelProperty(value = "响应时间(毫秒)", example = "111")
    private Integer rt;

    @JsonProperty("svr")
    @ApiModelProperty(value = "服务器ID", example = "177618784")
    private Long svr;

    @JsonProperty("lt")
    @ApiModelProperty(value = "未知字段(需确认用途)", example = "2")
    private Integer lt;

    @JsonProperty("full")
    @ApiModelProperty(value = "是否全量数据", example = "0")
    private Integer full;

    @JsonProperty("data")
    @ApiModelProperty("股票池数据")
    private StockPoolData data;

    @Data
    @ApiModel("股票池数据详情")
    public static class StockPoolData {

        @JsonProperty("tc")
        @ApiModelProperty(value = "总数", example = "2")
        private Integer totalCount;

        @JsonProperty("qdate")
        @ApiModelProperty(value = "查询日期(yyyyMMdd)", example = "20250506")
        private String date;

        @JsonProperty("pool")
        @ApiModelProperty("股票池列表")
        private List<LimitDownStockInfo> pool;
    }

    @Data
    @ApiModel("股票池项")
    public static class LimitDownStockInfo {

        @JsonProperty("c")
        @ApiModelProperty(value = "股票代码", example = "603696")
        private String code;

        @JsonProperty("m")
        @ApiModelProperty(value = "市场类型(1:沪市 0:深市)", example = "1")
        private Integer marketType;

        @JsonProperty("n")
        @ApiModelProperty(value = "股票名称", example = "安记食品")
        private String name;

        @JsonProperty("p")
        @ApiModelProperty(value = "最新价(单位:厘)", example = "13170")
        private Double price;

        @JsonProperty("zdp")
        @ApiModelProperty(value = "涨跌幅(%)", example = "-9.979494094848633")
        private Double changePercent;

        @JsonProperty("amount")
        @ApiModelProperty(value = "成交额(元)", example = "667113552")
        private Double amount;

        @JsonProperty("ltsz")
        @ApiModelProperty(value = "流通市值(元)", example = "3097584000")
        private Double ltsz;

        @JsonProperty("tshare")
        @ApiModelProperty(value = "总市值(元)", example = "3097584000")
        private Double totalMarketValue;

        @JsonProperty("pe")
        @ApiModelProperty(value = "动态市盈率", example = "123.98612213134766")
        private Double pe;

        @JsonProperty("hs")
        @ApiModelProperty(value = "换手率(%)", example = "21.2701358795166")
        private Double turnoverRate;

        @JsonProperty("fund")
        @ApiModelProperty(value = "封板资金", example = "29547171")
        private Double sealAmount;

        @JsonProperty("lbt")
        @ApiModelProperty(value = "最后封板时间", example = "92500")
        private String latestLimitDowntime;

        @JsonProperty("fba")
        @ApiModelProperty(value = "板上成交额(元)", example = "1877139958")
        private Double fba;

        @JsonProperty("days")
        @ApiModelProperty(value = "连续跌停天数", example = "2")
        private Integer days;

        @JsonProperty("oc")
        @ApiModelProperty(value = "开板次数", example = "2")
        private Integer openCount;

        @JsonProperty("hybk")
        @ApiModelProperty(value = "行业板块", example = "食品饮料")
        private String industry;
    }
}